\doxysubsection{x\+Event\+Group\+Clear\+Bits\+From\+ISR }
\hypertarget{group__x_event_group_clear_bits_from_i_s_r}{}\label{group__x_event_group_clear_bits_from_i_s_r}\index{xEventGroupClearBitsFromISR@{xEventGroupClearBitsFromISR}}
\doxylink{event__groups_8h_source}{event\+\_\+groups.\+h} 
\begin{DoxyPre}
   BaseType\_t xEventGroupClearBitsFromISR( EventGroupHandle\_t xEventGroup, const EventBits\_t uxBitsToSet );
\end{DoxyPre}


A version of x\+Event\+Group\+Clear\+Bits() that can be called from an interrupt.

Setting bits in an event group is not a deterministic operation because there are an unknown number of tasks that may be waiting for the bit or bits being set. Free\+RTOS does not allow nondeterministic operations to be performed while interrupts are disabled, so protects event groups that are accessed from tasks by suspending the scheduler rather than disabling interrupts. As a result event groups cannot be accessed directly from an interrupt service routine. Therefore x\+Event\+Group\+Clear\+Bits\+From\+ISR() sends a message to the timer task to have the clear operation performed in the context of the timer task.


\begin{DoxyParams}{Parameters}
{\em x\+Event\+Group} & The event group in which the bits are to be cleared.\\
\hline
{\em ux\+Bits\+To\+Clear} & A bitwise value that indicates the bit or bits to clear. For example, to clear bit 3 only, set ux\+Bits\+To\+Clear to 0x08. To clear bit 3 and bit 0 set ux\+Bits\+To\+Clear to 0x09.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
If the request to execute the function was posted successfully then pd\+PASS is returned, otherwise pd\+FALSE is returned. pd\+FALSE will be returned if the timer service queue was full.
\end{DoxyReturn}
Example usage\+: 
\begin{DoxyPre}
  \#define BIT\_0 ( 1 << 0 )
  \#define BIT\_4 ( 1 << 4 )

  // An event group which it is assumed has already been created by a call to
  // xEventGroupCreate().
  EventGroupHandle\_t xEventGroup;

  void anInterruptHandler( void )
  \{
    // Clear bit 0 and bit 4 in xEventGroup.
    xResult = xEventGroupClearBitsFromISR(
                        xEventGroup,     // The event group being updated.
                        BIT\_0 | BIT\_4 ); // The bits being set.

    if( xResult == pdPASS )
    \{
        // The message was posted successfully.
    \}
 \}
  \end{DoxyPre}
 